<template>
    <h1>计数器</h1>
    <div>{{ store.state.counter.count }}</div>
    <button @click="add">+</button>
</template>
<script lang='ts' setup>
//import store from '@/store';
import {useStore} from 'vuex'
const store=useStore()
const add=()=>{
    store.commit('counter/INCREMENT',2)
}


</script>
<style lang='scss' scoped>
</style>